home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Goodies / 3rd Party Demos / 3rd Party Plugins / Misc / StringPlug 1.1 / Read Me!
Encoding:
Text File  |  1998-08-23  |  1.2 KB  |  31 lines

  1. StringPlug 1.0
  2.  
  3. Written by Tim Spalone
  4.  
  5. One function the plugin supports is strcmp(string1 as string, string2 as string) As Integer.  This is a C++ version of REALbasic's StrComp, which contains a few bugs.  Strcmp is case sensative, so if you don't want it to be, do something like this:  strcmp(uppercase(mystr1),uppercase(mystr2)). 
  6.  
  7. Two more functions have been added, isUpper(char as string) As Boolean and isLower(char as string) As Boolean.  They simply tell you whether the character passed is uppercase, or lowercase.
  8.  
  9. If you've got any other suggestions or requests, ideas, etc., please e-mail jackal@bbq.detour.net and I'll try to add your request.
  10.  
  11. Example:
  12.  
  13. Dim result_code as integer
  14.  
  15. result_code=strcmp(editfield1.text,editfield2.text)
  16.  
  17. if result_code > 0 then
  18.         msgbox "The text in EditField1 alphabetically succeeds the text in EditField2."
  19. elseif result_code=0 then
  20.         msgbox "The text in EditField1 is equivalent to the text in EditField2."
  21. elseif result_code < 0 then
  22.         msgbox "The text in EditField1 alphabetically precedes the text in EditField2."
  23. end if
  24.  
  25. Version History:
  26.  
  27. Created:  8/16/98
  28.         strcmp(string1 as string, string2 as string) As Integer
  29.  
  30. Added:  8/23/98
  31.   isUpper(char as string) As Boolean, isLower(char as string) As Boolean